<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学生考试管理系统 - 在线考试</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <style>
        .exam-card {
            margin-bottom: 20px;
        }
        .exam-status {
            font-weight: bold;
        }
        .status-active {
            color: green;
        }
        .status-inactive {
            color: gray;
        }
        .status-ended {
            color: red;
        }
    </style>
</head>
<body>
<!-- 导航栏 -->
<nav class="navbar navbar-expand-lg navbar-light bg-light">
    <div class="container">
        <a class="navbar-brand" href="dashboard.html">
            <i class="fa fa-graduation-cap mr-2"></i>学生考试管理系统
        </a>

        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse" id="navbarNav">
            <ul class="navbar-nav">
                <li class="nav-item">
                    <a class="nav-link" href="dashboard.html">仪表盘</a>
                </li>
                <li class="nav-item active">
                    <a class="nav-link" href="exams.html">在线考试</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="examResult.html">成绩查询</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="profile.html">个人信息</a>
                </li>
            </ul>

            <ul class="navbar-nav ms-auto">
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                        <i class="fa fa-user-circle mr-1"></i>张三 (20230001)
                    </a>
                    <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
                        <li><a class="dropdown-item" href="profile.html">个人信息</a></li>
                        <li><a class="dropdown-item" href="changePassword.html">修改密码</a></li>
                        <li><hr class="dropdown-divider"></li>
                        <li><a class="dropdown-item" href="login.html">退出登录</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</nav>

<!-- 主内容 -->
<div class="container mt-4">
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-header">
                    <i class="fa fa-list-alt mr-2"></i>在线考试列表
                </div>
                <div class="card-body">
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            <th>考试ID</th>
                            <th>课程名称</th>
                            <th>考试时间</th>
                            <th>考试时长</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>1</td>
                            <td>Java程序设计</td>
                            <td>2025-06-20 09:00 - 2025-06-20 11:00</td>
                            <td>120 分钟</td>
                            <td>
                                <span class="badge bg-success status-active">已激活</span>
                            </td>
                            <td>
                                <a href="takeExam.html" class="btn btn-primary btn-sm">
                                    <i class="fa fa-pencil mr-1"></i>参加考试
                                </a>
                            </td>
                        </tr>
                        <tr>
                            <td>2</td>
                            <td>数据结构</td>
                            <td>2025-06-25 14:00 - 2025-06-25 16:00</td>
                            <td>120 分钟</td>
                            <td>
                                <span class="badge bg-secondary status-inactive">未开始</span>
                            </td>
                            <td>
                                <button class="btn btn-secondary btn-sm" disabled>
                                    <i class="fa fa-lock mr-1"></i>不可参加
                                </button>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 页脚 -->
<footer class="bg-light text-center text-muted mt-5 py-3">
    <div class="container">
        <p>© 2025 学生考试管理系统 | 由管理员分配账户</p>
    </div>
</footer>
</body>
</html>